#ifndef FILELISTMODEL_H
#define FILELISTMODEL_H

#include <QAbstractTableModel>
#include "convertdef.h"

class FileListModel : public QAbstractTableModel
{
    Q_OBJECT
public:
    explicit FileListModel(QObject *parent = 0);
    int rowCount(const QModelIndex &parent = QModelIndex()) const ;
    int columnCount(const QModelIndex &parent = QModelIndex()) const;
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
    void addFile(const Convert::FileInfo &info);
    Qt::ItemFlags flags(const QModelIndex & index) const;
    bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
    void removeRowsByModelIndexList(const QModelIndexList&);
signals:

public slots:

private:
    QList<Convert::FileInfo> m_dataList;
};

#endif // FILELISTMODEL_H
